import React, { Component } from 'react';
import { Carousel } from 'antd-mobile';
import 'common/components/imgCarousel.less';

/**
 * 轮播图
 */
class ImgCarousel extends Component{
	render(){
		return(
	        <Carousel autoplay={true} infinite autoplayInterval={2000}>
          		{
          			this.props.data.map((item, index) => {
		          		return(
		          			<div key={index} className='carousel'>
			          			<a><img src={item.imgUrl}/></a>
		          			</div>
		          		)
		          	})
	          	}
	        </Carousel>
		)
	}
}

export default ImgCarousel;